package com.zmj.security;

import com.zmj.security.model.UserSubject;

/**
 * @Author: zmj
 * @Date: 2025/1/14
 */
public class CurrentUserHolder {

    private static ThreadLocal<UserSubject> currentUser;

    static {
        currentUser = new ThreadLocal<>();
    }

    public static UserSubject get() {
        return currentUser.get();
    }

    public static void set(UserSubject userSubject) {
        currentUser.set(userSubject);
    }

}
